import request from "@utils/request"
import api from "@api"

export const searchStyle = ()=>{
    return request({
        method:"get",
        url:api.search.searchStyle
    })
}
export const searchList = (keyword)=>{
    return request({
        method:"get",
        url:api.search.searchList+keyword,
        data:{
            keyword
        }
    })
}

import Router from 'vue-router'

const originalPush = Router.prototype.push
Router.prototype.push = function push(location, onResolve, onReject) {
  if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)
  return originalPush.call(this, location).catch(err => err)
}